<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * This is a sample module for PyroCMS
 *
 * @author 		Jerel Unruh - PyroCMS Dev Team
 * @website		http://unruhdesigns.com
 * @package 	PyroCMS
 * @subpackage 	Sample Module
 */
class Admin extends Admin_Controller
{

	public function __construct()
	{
		parent::__construct();

		// Load all the required classes
		$this->load->library('form_validation');
		$this->lang->load('escort');

		// Set the validation rules
		$this->item_validation_rules = array(
			array(
				'field' => 'name',
				'label' => 'Name',
				'rules' => 'trim|max_length[255]|required'
			),
			array(
				'field' => 'slug',
				'label' => 'Slug',
				'rules' => 'trim|max_length[255]|required'
			)
		);

		$this->template->set_partial('shortcuts', 'admin/partials/shortcuts')
				->append_metadata(js('jquery.ui/jquery.simplemodal.js', 'database_definition'))
				->append_metadata(js('jquery.ui/jquery.scrollabletab.js', 'database_definition'))
				->append_metadata(js('escort.language.js', 'database_definition'))
				->append_metadata(js('escort.permission.js', 'database_definition'))
				->append_metadata(js('escort.category.js', 'database_definition'))
 				->append_metadata(js('escort.paymentgateway.js', 'database_definition'))
 				->append_metadata(js('escort.sexualorientations.js', 'database_definition'))
 				->append_metadata(js('escort.subcriptionoption.js', 'database_definition'))
 				->append_metadata(js('escort.haircoloroption.js', 'database_definition'))
 				->append_metadata(js('escort.mediatypesetting.js', 'database_definition'))
 				->append_metadata(js('escort.serviceoption.js', 'database_definition'))
 				->append_metadata(js('escort.packageoption.js', 'database_definition'))
 				->append_metadata(js('escort.workingplace.js', 'database_definition'))
 				->append_metadata(js('escort.weekday.js', 'database_definition'))
 				->append_metadata(js('escort.paymenttype.js', 'database_definition'))
 				->append_metadata(js('escort.traveloption.js', 'database_definition'))
 				->append_metadata(js('escort.servestooption.js', 'database_definition'))
 				->append_metadata(js('escort.paymentmethod.js', 'database_definition'))
				->append_metadata(js('escort.pricingtimeoption.js', 'database_definition'))
		 		->append_metadata(js('escort.extrasoption.js', 'database_definition'))
		 		->append_metadata(js('escort.sexoption.js', 'database_definition'))
		 		->append_metadata(js('escort.hairsizeoption.js', 'database_definition'))
		 		->append_metadata(js('escort.hairstyleoption.js', 'database_definition'))
		 		->append_metadata(js('escort.eyeoption.js', 'database_definition'))
				->append_metadata(js('escort.transportoption.js', 'database_definition'))
				->append_metadata(js('escort.priorityoption.js', 'database_definition'))
				->append_metadata(js('escort.profession.js', 'database_definition'))
				->append_metadata(js('escort.countrysetting.js', 'database_definition'))
				->append_metadata(js('escort.googlelanguage.js', 'database_definition'))
				->append_metadata(js('escort.js', 'database_definition'))
				->append_metadata(css('escort.css', 'database_definition'))
				->append_metadata(css('osx.css', 'database_definition'))
				->append_metadata(css('confirm.css', 'database_definition'));
	}

	/**
	 * List all items
	 */
	public function index()
	{
		$groups = array();
		$this->template
		->title($this->module_details['name'], lang('cirpho_group_list_title'))
		->set('groups', $groups)
		->build('admin/options/index', $this->data);
	}
}
